package com.h3c.nem.controller;

import com.eos.common.constant.StatusCodeEnum;
import com.eos.common.util.Result;
import com.h3c.nem.service.ITbOfferContactorService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 紧急联系人控制层
 *
 * @author chenyifan
 * @since 2022-06-06 10:06:46
 */
@CrossOrigin
@RestController
@AllArgsConstructor
@RequestMapping("/tbOfferContactor")
public class TbOfferContactorController {
    /**
     * 服务对象
     */
    private final ITbOfferContactorService tbOfferContactorService;

    /**
     * 回显紧急联系人信息
     * @return
     */
    @GetMapping("/showContactorInfo")
    public Result<String> showContactorInfo(){
        try {
            return new Result(true, StatusCodeEnum.NORMAL,tbOfferContactorService.showContactorInfo());
        } catch (Exception e) {
            return new Result(false, StatusCodeEnum.ADD_FAIl);
        }
    }
}

